package com.TeaManage.bean;

import java.util.Date;

public class Purchase {
    private Integer purchase_id;
    private Integer supplier_id;
    private Integer warehouse_id;
    private String purchase_no;
    private Double total_amount;
    private Integer status = 0; // 0:待审核 1:已审核 2:已入库 3:已完成 4:已取消
    private Date purchase_date;
    private Date created_at;
    private String remark;

    // 关联对象，用于显示
    private Supplier supplier;
    private Warehouse warehouse;


    public Purchase() {
    }

    public Purchase(Integer purchase_id, Integer supplier_id, Integer warehouse_id, String purchase_no, Double total_amount, Integer status) {
        this.purchase_id = purchase_id;
        this.supplier_id = supplier_id;
        this.warehouse_id = warehouse_id;
        this.purchase_no = purchase_no;
        this.total_amount = total_amount;
        this.status = status;
    }

    /**
     * 获取
     * @return purchase_id
     */
    public Integer getPurchase_id() {
        return purchase_id;
    }

    /**
     * 设置
     * @param purchase_id
     */
    public void setPurchase_id(Integer purchase_id) {
        this.purchase_id = purchase_id;
    }

    /**
     * 获取
     * @return supplier_id
     */
    public Integer getSupplier_id() {
        return supplier_id;
    }

    /**
     * 设置
     * @param supplier_id
     */
    public void setSupplier_id(Integer supplier_id) {
        this.supplier_id = supplier_id;
    }

    /**
     * 获取
     * @return warehouse_id
     */
    public Integer getWarehouse_id() {
        return warehouse_id;
    }

    /**
     * 设置
     * @param warehouse_id
     */
    public void setWarehouse_id(Integer warehouse_id) {
        this.warehouse_id = warehouse_id;
    }

    /**
     * 获取
     * @return purchase_no
     */
    public String getPurchase_no() {
        return purchase_no;
    }

    /**
     * 设置
     * @param purchase_no
     */
    public void setPurchase_no(String purchase_no) {
        this.purchase_no = purchase_no;
    }

    /**
     * 获取
     * @return total_amount
     */
    public Double getTotal_amount() {
        return total_amount;
    }

    /**
     * 设置
     * @param total_amount
     */
    public void setTotal_amount(Double total_amount) {
        this.total_amount = total_amount;
    }

    /**
     * 获取
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取
     * @return purchase_date
     */
    public Date getPurchase_date() {
        return purchase_date;
    }

    /**
     * 设置
     * @param purchase_date
     */
    public void setPurchase_date(Date purchase_date) {
        this.purchase_date = purchase_date;
    }

    /**
     * 获取
     * @return created_at
     */
    public Date getCreated_at() {
        return created_at;
    }

    /**
     * 设置
     * @param created_at
     */
    public void setCreated_at(Date created_at) {
        this.created_at = created_at;
    }

    /**
     * 获取
     * @return remark
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 获取
     * @return supplier
     */
    public Supplier getSupplier() {
        return supplier;
    }

    /**
     * 设置
     * @param supplier
     */
    public void setSupplier(Supplier supplier) {
        this.supplier = supplier;
    }

    /**
     * 获取
     * @return warehouse
     */
    public Warehouse getWarehouse() {
        return warehouse;
    }

    /**
     * 设置
     * @param warehouse
     */
    public void setWarehouse(Warehouse warehouse) {
        this.warehouse = warehouse;
    }

    public String toString() {
        return "Purchase{purchase_id = " + purchase_id + ", supplier_id = " + supplier_id + ", warehouse_id = " + warehouse_id + ", purchase_no = " + purchase_no + ", total_amount = " + total_amount + ", status = " + status + ", purchase_date = " + purchase_date + ", created_at = " + created_at + ", remark = " + remark + "}";
    }
}
